﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"><%var item = ViewData["Corp"] as CorporationModel; %> 大学生兼职网 -<%:item.CompanyName %></asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <link href="/content/css/main.css" rel="stylesheet" type="text/css" />
    <link href="/content/css/joblist.css" rel="stylesheet" type="text/css" />
    <link href="/content/css/company.css" rel="stylesheet" type="text/css" />
    <link href="/content/css/common.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/Scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript">
        function DoDiscussFeedback(type, id) {
            $.ajax({
                url: '/home/discussfeedback',
                type:'post',
                data: { type: type, id: id },
                cache: true,
                success: function () { window.location.href = window.location.href; }
            });
        }
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%var corp = ViewData["Corp"] as CorporationModel; %>
        <div class="content">
            <div class="contentline">
                <div style="width: 100%; height: 15px; overflow: hidden">
                </div>
                <div class="left">
                    <a href="/">
                        <img alt="重庆大学生兼职网" src="/content/images/logo2.png" /></a></div>
                <div class="left">
                    <div class="main-nav-top">
                        <a href="/">重庆大学生兼职网</a> > <a href="<%:Request.RawUrl %>"><%:corp.CompanyName %>专栏</a></div>
                </div>
                <div class="right" style="margin-top: 20px; padding-right: 2px;">
                     <%if (HttpContext.Current.User.Identity.IsAuthenticated)
                  {
                      if (new UserService(HttpContext.Current.User.Identity.Name).GetUser().Role == MemberStatus.Firm)
                      { %>
                <a href="/CompanyCenter/Recruiting" target="_blank">
                    <img alt="发布兼职" src="/content/images/button-jzfb.png" /></a>
                    <%}
                  else
                  {%>
                <a href="/home/roleselect" target="_blank">
                    <img alt="发布兼职" src="/content/images/button-jzfb.png" /></a>
                <%} %>
                <%}
                  else
                  {%>
                <a href="/home/roleselect" target="_blank">
                    <img alt="发布兼职" src="/content/images/button-jzfb.png" /></a>
                <%} %>
                </div>
                <div style="width: 100%; height: 10px; overflow: hidden">
                </div>
            </div>
            <div class="company">
                <div class="company-title">
                    <div class="left">
                        <h1>
                            <%:corp.CompanyName %></h1>
                    </div>
                    <div class="left">
                        <div class="company-type">
                            <a href="/home/CompanyLevel" target="_blank"><%:corp.CertificationLevel.Mapping() %></a></div>
                    </div>
                </div>
                <div class="company-info">
                    <div>
                        联系电话：<%:corp.Phone %></div>
                    <div>
                        公司地址：<%:corp.Location %></div>
                    <div class="hspace3">
                    </div>
                    <div>
                        公司简介：</div>
                    <div class="hspace3">
                    </div>
                    <div style="text-indent:25px;">
                    <%if (String.IsNullOrEmpty(corp.About.NoHTMLLabel().Trim()))
                      {%>
                      暂无简介    
                    <%}
                      else
                      { %>
                      <%=corp.About %>
                      <%} %>
                    </div>
                </div>
            </div>
            <div class="hspace10">
            </div>
            <div class="hspace10">
            </div>
            <div class="company-subtitle">
            <%var positions = ViewData["Positions"] as ItemListBox<ueEngine.Biz.Core.ExServer.WorkPool.WorkHandle.FullSearch.PositionCell>; %>
                <div class="left">
                    <div class="company-subtitle-text">
                        该企业发布的兼职(<span class="number"><%:positions.ItemTotle%></span>)</div>
                </div>
                <div class="joblist-more">
                    <a href="/home/PositionList_ag=<%:EncodeByBase64.Encode(corp.Agent) %>" target="_blank">
                        <img alt="更多兼职" src="/content/images/more2.png"></a>
                </div>
            </div>
            <div class="joblist">
                <div class="joblist-list2">
                    <div class="joblist-header">
                        <div class="joblist-line1-1">
                            <span style="margin-left: 15px;">兼职</span>
                            </div>
                        
                        <div class="joblist-line3">
                            发布时间</div>
                        <div class="joblist-line2">
                            区域</div>
                            <div class="joblist-line5-1">
                            职位类型
                        </div>
                    </div>
                    <%foreach (ueEngine.Biz.Core.ExServer.WorkPool.WorkHandle.FullSearch.PositionCell item in positions.Data)
                      { %>
                    <div class="joblist-item">
                        <div class="joblist-line1-1">
                            <div class="joblist-item-pin">
                            </div>
                            <div class="joblist-item-title">
                                <a href="/home/jobdetail_<%:item.RecuritId %>"><%:item.Title %></a></div>
                        </div>
                        <div class="joblist-line3">
                            <%var span = DateTime.Now.Subtract(item.PublishDate);
                              if (span.TotalMinutes <= 30)
                              { %>
                            <%:(int)span.TotalMinutes %>分钟前
                            <%}
                              else if (DateTime.Now.DayOfYear - item.PublishDate.DayOfYear == 0)
                                  { %>
                            <%:"今天"%>
                            <%}
                                  else
                                  {%>
                            <%:item.PublishDate.ToString("M-d") %>
                            <%} %></div>
                        <div class="joblist-line2">
                            <a href="/home/PositionList_ag=<%:EncodeByBase64.Encode(corp.Agent) %>&areaCode=<%:(int)item.WorkArea.DeMapping() %>"><%:item.WorkArea %></a></div>
                            <div class="joblist-line5-1">
                            <a href="/home/jobdetail_<%:item.RecuritId %>"><%:((PositionType)item.PositionType).Mapping() %></a>
                        </div>
                    </div>
                    <%} %>
                </div>
            </div>
            <div class="hspace10">
            </div>
            <div class="hspace10">
            </div>
            <div class="company-subtitle">
                <div class="left">
                    <div class="company-subtitle-text">
                        网友们对该企业的最新评论</div>
                </div>
                <div style="margin-top:11px; font-size:12px; margin-left:15px; float:left;">
                        <a target="_blank" href="/home/CorpDiscuss_ag=<%:EncodeByBase64.Encode(corp.Agent) %>" style="color: #a10000">我要评论</a></div>
                <div class="joblist-more">
                    <a target="_blank" href="/home/CorpDiscuss_ag=<%:EncodeByBase64.Encode(corp.Agent) %>">
                        <img alt="更多评论" src="/content/images/more2.png"></a>
                </div>
            </div>
            <div class="comments">
            <%var discusses = ViewData["Discusses"] as ItemListBox<ShortDiscussModel>;
              MemberModel User=null;
              if (discusses.ItemTotle > 0)
              {
                  foreach (var item in discusses.Data)
                  { %>
                <div class="comment-item">
                    <div class="comment-item-img">
                        <img alt="匿名用户" src="/content/images/noheadpic.jpg" />
                    </div>
                    <div class="comment-item-content">
                        <div style="width: 100%; overflow: hidden">
                            <div class="left" style="color: #999">
                                <%if (String.IsNullOrEmpty(item.Author))
                                  { %>
                                  匿名用户
                                <%}
                                  else
                                  { %>
                                    <%User = new ueEngine.Biz.Core.AppService.Member.UserService(item.Author).GetUser();
                                      if (User != null)
                                      { %>
                                      <%:User.Location%> 用户
                                    <%}
                                      else
                                      { %>
                                        匿名用户
                                    <%} %>
                                <%} %>：</div>
                            <div class="left"></div>
                            <div class="right" style="color: #999">
                                发表日期：<%:item.WriteDate.ToString("yyyy-MM-dd HH:mm")%></div>
                        </div>
                        <div class="comment-item-content-main">
                            <span class="number">[<%:item.Appraise.Mapping()%>]</span>：<%=item.Content%>
                        </div>
                        <div style="width: 100%; overflow: hidden">
                            <div class="comment-item-vote">
                                <a href="javascript:;" onclick="DoDiscussFeedback('1','<%:item.Id %>')">赞同[<%:item.Up%>]</a> | <a href="javascript:;" onclick="DoDiscussFeedback('0','<%:item.Id %>')">反对[<%:item.Down%>]</a></div>
                        </div>
                    </div>
                </div>
            <%}
              }
              else
              { %>
              <div class="none-item">
                <div class="none-item-icon"></div>
                <div class="none-item-message">
                暂无网友评价该企业，如果您了解他们，立即<a href="/home/CorpDiscuss_ag=<%:EncodeByBase64.Encode(corp.Agent) %>">添加评论</a>
                </div>
              </div>
              <%} %>
            </div>
        </div>
</asp:Content>

